package com.dateAndTime;

import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

public class Test {
    public static void main(String[] args) {
        ScheduledThreadPoolExecutor task = new ScheduledThreadPoolExecutor(1);
       task.schedule(() ->{
           System.out.println("hhh");
       },10000, TimeUnit.MILLISECONDS);
       task.schedule(() -> {
           System.out.println("asasdf");
       },20000,TimeUnit.MILLISECONDS);
    }
}
